pp108 : Inbox Control

Inbox Control

 This topic describes the Inbox control used in a user interface.


The Inbox control is used to display the Process Platform Inbox in a user interface. To create associations between this control and any required model, you can  use message map. The mapping defined between the control and the model is stored in a mapping object.

Schema

Process Platform XForms provide a schema for the Inbox control using which the task data in the Inbox can be mapped with a data source. Using the schema, you can easily access and bind data to the control. A sample of the schema is provided below:

<InboxControl>
    <Control type="target/all">
        <!-- Provide Target types if the control type selected is 'target' -->
        <Target type="user/role/worklist/team"/>
        <!--Need not provide any elements if the control type is 'all'-->
    </Control>
    <Criteria>
        <Query xmlns="http://schemas.cordys.com/cql/1.0">
			<And>
				<LE field="StartDate">
                    <Value>2016-06-04T11:09:32.32</Value>
                </LE>
				<GE field="StartDate">
                    <Value>2015-06-04T11:09:32.32</Value>
                </GE>
			</And>
		</Query>
    </Criteria>
    <TaskIdentifiers>
        <TaskIdentifierType id="" name=""/>
    </TaskIdentifiers>
    <OrderBy/>
    <ShowNonWorkableItems/>
</InboxControl>

Schema Element

Description

Parameters

Accepted input values

Control

Refers to the type of the control from which the data should be retrieved

The value for the type element can be

  • target - to retrieve the tasks from a specific target such as a Sales work list, a user JDoe, a Manager role, or a Sales team.
  • all - retrieves all the tasks pertaining to the current user.

Based on the type provided, the parameters to be provided for the elements change. The following is the list of accepted input values for the elements:

  • target -
    • role - Provide the DN of the role
    • team - Provide the ID of the organizational unit
    • worklist - Provide the ID of the work list
    • user - Provide the DN of the user.
  • all - Need not provide any values.

Query

Contains the CQL format query used to search the task

And, Or, EQ, NQ, LT, LE, GT, GE, In, Like, Between, IsNull, Not (can be nested and repeated)
  • TaskId
  • ParentTaskId
  • SourceInstanceId
  • State
  • ProcessName
  • Activity
  • Priority
  • Sender
  • SourceType
  • Assignee
  • CompletedByUser
  • DelegatedToUser
  • DeliveryDate
  • StartDate
  • DueDate
  • StartedOn
  • CompletionDate
  • IsPriorityFixed
  • UITaskId

TaskIdentifiers

Contains the set of task identifier types used to search the task

 
  • id - GUID of the taskidentifier to be queried upon.
  • name - must be 'TaskIdentifier'.

OrderBy

Contains the parameter by which the search results are to be sorted.

 

You can sort based on System attributes such as:

  • Activity
  • Assignee
  • Sender
  • StartDate
  • StartedOn
  • DueOn
  • Priority
  • State
  • DeliveryDate
  • TaskId

ShowNonWorkableItems

Indicated whether the non-workable tasks for the user must be shown or not.

 

Accepts boolean value.

  • true: lists the tasks which are not workable by the user along with the other tasks.
  • false: does not list tasks which are not workable by the current user.


In order to display details of a location in a window, you need to extend the schema by adding elements to the BusinessObject element of the schema. Open the message map of the model used in the control, right-click the Business Object element in the Target pane, and select Add element. A new node is added to schema. You can modify the node to define the new element.

Properties of the Control

The properties associated with the Inbox control define its behavior. You can set the ID of the Control either in the property sheet of the control or programmatically using the APIs.

Table 1. List of Properties

Design-time property

Run-time property

Description

ID

id

Provide the string that identifies the control on an XForm. If not specified, a unique ID is automatically generated.

 

Target type

Target Type can be role, team, worklist, or user.

 

Target

Target:

  • role - Provide the DN of the role
  • team - Provide the ID of the organizational unit
  • worklist - Provide the ID of the worklist
  • user - Provide the DN of the user

Methods of the Control

You can call the following methods to programmatically set the various properties that are available on the Inbox Composite Control.

Table 2. List of Methods

Design-Time Method

Description

showTasksByTarget(sTargetType, sTargetValue)

Retrieves all the tasks that are sent to the Target of type sTargetType and identified by sTargetValue, and displays them in the Inbox Composite Control. The following values are accepted for:

  • sTargetType - user/role/team/worklist
  • sTargetValue:
    • role - Provide the DN of the role
    • team - Provide the ID of the organizational unit
    • worklist - Provide the ID of the work list
    • user - Provide the DN of the user

showAllMyTasks()

Retrieves all the tasks pertaining to the current user and displays them in the Inbox Composite Control.

getFilterXml()

Returns an instance of the Inbox Composite Control schema for the current settings.

setFilterXml(sControlXML)

Retrieves all the tasks that satisfy the query settings provided by 'sControlXML' and displays them in the Inbox Composite Control.
This method takes 'sControlXML', an XML instance of the Inbox Composite Control Schema defined above.
A sample Inbox XML is given below:

<InboxControl xmlns="http://schemas.cordys.com/notification/workflow/1.0">
    <Control type="target">
        <Target type="user/role/team/worklist">DN/ID</Target>
    </Control>
    <Criteria>
        <Query></Query>
    </Criteria>
    <TaskIdentifiers>
        <TaskIdentifierType/>
    </TaskIdentifiers>
    <OrderBy/>
    <ShowNonWorkableItems/>
</InboxControl>